<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <label>
        请输入南昌今天的空气质量：
        <input id="aqi-input" type="text" />
    </label>
    <button id="button" onclick="display()">确认填写</button>
    <div>您输入的值是：
        <span id="aqi-display">这是HTML</span>
        <span id="test">这是text</span>
    </div>
    
    <script>
        function display(){
            let air = document.getElementById("aqi-input").value;
            document.getElementById("aqi-display").innerHTML=air;
            document.getElementById("test").innerText=air;            
        }
    </script>
</body>
</html>
